package com.budwk.app.miniapp.models;

import cn.hutool.core.util.IdUtil;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;

import java.util.Date;

@Data
@Table("shequ.sqfw_notice")
public class SqfwNotice {

    @Name
    @Column("notice_id")
    @Prev(els=@EL("$me.nextId()"))
    private String noticeId;

    /**
     * notice_title
     */
    @Column("notice_title")
    private String noticeTitle;

    /**
     * notice_type
     */
    @Column("notice_type")
    private int noticeType;

    /**
     * notice_content
     */
    @Column("notice_content")
    @ColDefine(type = ColType.TEXT)
    private String noticeContent;

    /**
     * status
     */
    @Column("status")
    private int status;

    /**
     * create_by
     */
    @Column("create_by")
    private String createBy;

    @Column("create_name")
    private String createName;
    /**
     * create_time
     */
    @Column("create_time")
    private Date createTime;

    /**
     * update_by
     */
    @Column("update_by")
    private String updateBy;

    /**
     * update_time
     */
    @Column("update_time")
    private Date updateTime;

    /**
     * remark
     */
    @Column("remark")
    private String remark;
    @Column(value ="province")
    private String province;

    @Column(value ="city")
    private String city;

    @Column(value ="district")
    private String district;
    @Column(value ="county")
    private String county;

    @Column(value ="community")
    private String community;

    private int pageNo;
    private int pageSize;
    private String sort;

    public String nextId() {
        return IdUtil.getSnowflake(1, 1).nextIdStr();

    }
}
